<template>
	<view class="text-container">
		<custom-nav title="协议" :isShowBg="false" :isBlack="true" :isShowLeft="true"></custom-nav>
		<view class="main">
			<PdfView :pdfUrl="pdfUrl" />
			<!-- <web-view :src="pdfUrl" v-if="pdfUrl"></web-view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pdfUrl: '',
			}
		},
		onLoad(e) {
			const pdfname = e.type == 1? 'user.pdf':'private.pdf';
			this.pdfUrl = `${process.env.BASE_URL}static/pdf/${pdfname}`;
		}
	}
</script>

<style lang="scss" scoped>
	.text-container {
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 100vh;
		justify-content: center;
		align-items: center;
		.main{
			flex: 1;
			width: 100%;
		}
	}
</style>